<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>控制台</title>
<link href="../tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" type="../tablecloth/tablecloth.js"></script>
<script type="text/javascript" src="../Js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../Js/haidao.offcial.general.js"></script>
<script type="text/javascript" src="../Js/select.js"></script>
<script type="text/javascript" src="../Js/haidao.validate.js"></script>
<script type="text/javascript">
$(function(){init();});
function init() {
	var page = parseInt(document.form1.currentPage.value);
	var pageCount = parseInt(document.form1.pageCount.value);
	var count=parseInt(document.form1.count.value);
	if (page == 1 && pageCount!=1) {
		document.form1.pre1.disabled = "disabled";
		return;
	}
	if (page == count && pageCount!=1) {
		document.form1.next1.disabled = "disabled";
		return;
	}
	if (pageCount == 1) {
		document.form1.pre1.disabled = "disabled";
		document.form1.next1.disabled = "disabled";
		document.form1.first1.disabled = "disabled";
		document.form1.end1.disabled = "disabled";
		return;
	}
} 

function first() {
	window.location.href = "<%=request.getContextPath()%>/statist/list?currentPage=1" ;
	//+ getQueryData()
	
}

function next() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/statist/list?currentPage=" + (page + 1) ;
}

function pre() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/statist/list?currentPage=" + (page - 1) ;
}

function end() {
	var pageCount = parseInt(document.form1.pageCount.value);
	window.location.href = "<%=request.getContextPath()%>/statist/list?currentPage=" + pageCount ;
}

// //拼接查询条件
// function getQueryData(){
// 	var orderNO=$("#orderNO").val();
// 	var userName=$("#userName").val();
// 	var userNO=$("#userNO").val();
// 	var operationTime1=$("#operationTime1").val();
// 	var operationTime2=$("#operationTime2").val();
// 	var score1=$("#score1").val();
// 	var score2=$("#score2").val();
// 	var orderTime1=$("#orderTime1").val();
// 	var orderTime2=$("#orderTime2").val();
// 	var queryper="&orderNO="+orderNO+"&userName="+userName+"&userNO="+userNO+"&score1="+score1+"&score2="+score2
// 	+"&orderTime1="+orderTime1+"&orderTime2="+orderTime2+"&operationTime1="+operationTime1+"&operationTime2="+operationTime2;
// 	return queryper;
// 	}

</script>
<style>
.del {
	background-color: #C00;
	color: #FFF;
	border-radius: 5px;
	line-height: 20px !important;
	padding: 1px 6px;
}
</style>


</head>

<body>
	<div>
		<div class="view-sidebar">
			<div class="sidebar-content" id="sidebar"></div>
		</div>
		<div class="view-product">
			<div class="message-manage">
				<div class="manage-record margin-lr">
					<div class="clear"></div>
					<div class="offcial-table margin-top clearfix">
						<div class="tr-th clearfix">
					<form name="form1" method="get" action="<%=request.getContextPath()%>/statist/list">
							<table width="100%" border="0">
								<thead>
									<tr>
										<th>注册来源</th>
										<th>渠道编号</th>
										<th>用户ID</th>
										<th>用户名称</th>
										<th>注册时间</th>
										<th>是否借款</th>
										<th>是否放款</th>
										<th>是否逾期</th>
										<th>逾期次数</th>
										<th>借款次数</th>
										<th>累计放款次数</th>
										<th>累计借款金额</th>
										<th>累计还款金额</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="u">
										<tr style="white-space: nowrap;">
											<td>${u.deviceType}</td>
											<td>${u.channelNumber}</td>
											<td>${u.userNo}</td>
											<td>${u.userName}</td>
											<td>${u.logtime}</td>
											<td>${u.isLoan}</td>
											<td>${u.isCredit}</td>
											<td>${u.isOverdue}</td>
											<td>${u.countOverdueNum}</td>
											<td>${u.loanSumNo}</td>
											<td>${u.countCreditNum}</td>
											<td>${u.sumCreditMoney}</td>
											<td>${u.sumRefundMoney}</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<table><tbody><tr><td>
							    <input type="hidden" name="currentPage" value="${currentPage}" /> 
								<input type="hidden" name="pageCount" value="${pageCount}"/> 
								<input type="hidden" name="count" value="${count}"/>
								<input type="button" name="first1" value="首页" onclick="first()" class="button gray" /> 
								<input type="button" name="pre1" value="上一页" onclick="pre()" class="button green"/> 
								<input type="button" name="next1" value="下一页" onclick="next()" class="button blue"/> 
								<input type="button" name="end1" value="尾页" onclick="end()" class="button gray"/> 
								<font>第${currentPage}页, 共${pageCount}页,共${count}条数据</font>
							</td></tr></tbody></table>
						</form>
						</div>
					</div>
				</div>
				<div class="clear"></div>
				<div class="show-page padding-big-right hidden">
					<div class="page"></div>
				</div>
			</div>
		</div>
	</div>
</body>

</html>